﻿<UserControl x:Class="com.bodurov.NearestStarsVisualizer.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="1024" Height="750">
    <Grid x:Name="LayoutRoot" Background="#000000">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="844"/>
			<ColumnDefinition Width="180"/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="750" />
		</Grid.RowDefinitions>
        
        
		<Canvas x:Name="GraphContainer" Grid.Column="0" Grid.Row="0" Visibility="Collapsed">
		</Canvas>
        

        <Canvas Grid.Row="0" Grid.Column="0" x:Name="ProcessRunningSign" 
			Visibility="Visible" 
			Canvas.ZIndex="100" Margin="180 0 0 0"
			HorizontalAlignment="Center" 
			VerticalAlignment="Center">
            <Canvas Width="1" Height="1">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <RotateTransform x:Name="angle" Angle="0" CenterX="0.5" CenterY="0.5"/>
                        <TranslateTransform X="-0.5" Y="-0.5"/>
                        <ScaleTransform ScaleX="100" ScaleY="100"/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Canvas.Triggers>
                    <EventTrigger>
                        <BeginStoryboard>
                            <Storyboard x:Name="rotation">
                                <DoubleAnimation To="1" Duration="0:0:1"
													Storyboard.TargetName="content"
													Storyboard.TargetProperty="Opacity"/>
                                <DoubleAnimation From="0" To="359" Duration="0:0:3" RepeatBehavior="Forever"
													Storyboard.TargetName="angle"
													Storyboard.TargetProperty="Angle"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Canvas.Triggers>
                <Canvas Name="content" Opacity="0">
                    <Path Width="1" Height="1" Stretch="Fill" Stroke="#77CCCC" StrokeThickness="0.1" StrokeStartLineCap="Round">
                        <Path.Data>
                            <PathGeometry>
                                <PathFigure StartPoint="1,0">
                                    <ArcSegment Point="0,-1" RotationAngle="90" SweepDirection="Clockwise" IsLargeArc="True" Size="1,1"/>
                                </PathFigure>
                            </PathGeometry>
                        </Path.Data>
                    </Path>
                    <Path Canvas.Left="0.49" Canvas.Top="-0.05" Width="0.2" Height="0.2" Stretch="Fill" Fill="#77CCCC">
                        <Path.Data>
                            <PathGeometry>
                                <PathFigure StartPoint="0,-1.1">
                                    <LineSegment Point="0.1,-1" />
                                    <LineSegment Point="0,-0.9" />
                                </PathFigure>
                            </PathGeometry>
                        </Path.Data>
                    </Path>
                </Canvas>
            </Canvas>
        </Canvas>


        <Canvas x:Name="ControlContainer" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Background="#000000" Visibility="Collapsed">
            <TextBlock Style="{StaticResource TextBlockStyle}" Text="axes relative to the observer" Foreground="Gray" 
				Canvas.Top="270" Canvas.Left="10" />
			<TextBlock Style="{StaticResource TextBlockStyle}" Text="X" Canvas.Top="292" Canvas.Left="8" />
			<Slider x:Name="SliderX" 
				Canvas.Top="290" 
				Canvas.Left="20" 
				Width="150" 
				ValueChanged="SliderX_ValueChanged" 
				MouseEnter="SliderX_MouseEnter" />
			<TextBlock Style="{StaticResource TextBlockStyle}" Text="Y" Canvas.Top="322" Canvas.Left="8" />
			<Slider x:Name="SliderY" 
				Canvas.Top="320" 
				Canvas.Left="20" 
				Width="150" 
				ValueChanged="SliderY_ValueChanged" 
				MouseEnter="SliderY_MouseEnter" />
			<TextBlock Style="{StaticResource TextBlockStyle}" Text="Z" Canvas.Top="352" Canvas.Left="8" />
			<Slider x:Name="SliderZ" 
				Canvas.Top="352" 
				Canvas.Left="20" 
				Width="150"
				ValueChanged="SliderZ_ValueChanged" 
				MouseEnter="SliderZ_MouseEnter" />

			<TextBlock Style="{StaticResource TextBlockStyle}" Text="X" Canvas.Top="385" Canvas.Left="8" />
			<TextBox x:Name="DegreesX" Text="0" 
				TextAlignment="Right" TabIndex="12"
				Width="30" 
				Canvas.Top="380" 
				Canvas.Left="20" 
				LostFocus="DegreesX_LostFocus" 
				KeyUp="DegreesX_KeyUp" />
			<TextBlock Style="{StaticResource TextBlockStyle}" Text="Y" Canvas.Top="385" Canvas.Left="70" />
			<TextBox x:Name="DegreesY" Text="0" 
				TextAlignment="Right" TabIndex="13" 
				Width="30" 
				Canvas.Top="380" Canvas.Left="80" 
				LostFocus="DegreesY_LostFocus" 
				KeyUp="DegreesY_KeyUp" />
			<TextBlock Style="{StaticResource TextBlockStyle}" Text="Z" Canvas.Top="385" Canvas.Left="127" />
			<TextBox x:Name="DegreesZ" Text="0" 
				TextAlignment="Right" TabIndex="14"
				Width="30" 
				Canvas.Top="380" Canvas.Left="138" 
				LostFocus="DegreesZ_LostFocus" 
				KeyUp="DegreesZ_KeyUp" />

			<Button x:Name="ResetBtn" Content="center" TabIndex="15" 
				Width="150" Canvas.Top="410" Canvas.Left="20" 
				Click="ResetBtn_Click" />

            <TextBox x:Name="StarDetails" Background="#000000" Foreground="Wheat" BorderBrush="Transparent" TextWrapping="Wrap" Canvas.Top="450" Canvas.Left="-70" Width="240" Height="290"></TextBox>
            <TextBlock Canvas.Left="10" Canvas.Top="248" FontStyle="Italic" Foreground="Gray" Text="* use mouse wheel to zoom" />
        </Canvas>
    </Grid>
</UserControl>
